﻿using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace BeatEmUp
{
    class Map
    {
        List<GameField> gameFields;
        int activeGameField;

        public Map(GameManager game)
        {
            gameFields = new List<GameField>();
            gameFields.Add(new GameField(new Rectangle(0, 150, game.graphics.GraphicsDevice.Viewport.Width, game.graphics.GraphicsDevice.Viewport.Height - 250)));
            activeGameField = 0;
            MovementBoundaries.gameField = gameFields[activeGameField].GetFieldSize();
        }

        public void LoadContent(ContentManager content,GraphicsDevice graphicsDevice)
        {
            gameFields[activeGameField].LoadContent(content, graphicsDevice);
        }

        public GameField GetActiveGameField()
        {
            return gameFields[activeGameField];
        }

        public void Update(GameTime gameTime)
        {
            
        }

        public void Draw(SpriteBatch sb)
        {
            gameFields[activeGameField].Draw(sb);
        }
    }
}
